package vikaa.timelinepackage;

import vikaa.ui.WeiboFriendChoose;
import vikaa.wowo.R;
import vikaa.wowo.cache.AuthoSharePreference;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

public class TimelineImport extends Activity implements OnClickListener{
	private LinearLayout backBtn;
	private RelativeLayout myweiboBtn;
	private RelativeLayout fdweiboBtn;
	private RelativeLayout smsBtn;
	private RelativeLayout photoBtn;
	public static String space_id;
	public static String weibo_uid;
	public static String role;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.import_weibo);
		space_id = getIntent().getExtras().getString("space_id");
		weibo_uid = AuthoSharePreference.getUid(TimelineImport.this);
		role = getIntent().getExtras().getString("role");
		initview();
	}
	
	public void onClick(View v) {
		switch(v.getId()){
		case R.id.backBtn:
			finish();
			break;
		case R.id.myweiboRl:
			Intent i = new Intent(TimelineImport.this,TimelineImportWeibo.class);
			i.putExtra("space_id", space_id);
			i.putExtra("weibo_uid", weibo_uid);
			i.putExtra("role",role);
			startActivity(i);
			finish();
			break;
		case R.id.friendweiboRl:
			WeiboFriendChoose.setflag = true;
			Intent i1 = new Intent(TimelineImport.this,WeiboFriendChoose.class);
			startActivity(i1);
			finish();
			break;
		case R.id.smsRl:
			break;
		case R.id.photoRl:
			Intent i11 = new Intent(TimelineImport.this,TimelineGallery.class);
			i11.putExtra("space_id", space_id);
			i11.putExtra("role",role);
			startActivity(i11);
			finish();
			break;
		}
	}
	private void initview(){
		backBtn = (LinearLayout)findViewById(R.id.backBtn);
		backBtn.setOnClickListener(this);
		myweiboBtn = (RelativeLayout)findViewById(R.id.myweiboRl);
		myweiboBtn.setOnClickListener(this);
		fdweiboBtn = (RelativeLayout)findViewById(R.id.friendweiboRl);
		fdweiboBtn.setOnClickListener(this);
		smsBtn = (RelativeLayout)findViewById(R.id.smsRl);
		smsBtn.setOnClickListener(this);
		photoBtn = (RelativeLayout)findViewById(R.id.photoRl);
		photoBtn.setOnClickListener(this);
		LinearLayout scv = (LinearLayout)findViewById(R.id.scv);
		scv.setOnClickListener(this);
	}
}
